home *** CD-ROM | disk | FTP | other *** search
/ ftp.cs.arizona.edu / ftp.cs.arizona.edu.tar / ftp.cs.arizona.edu / icon / newsgrp / group01b.txt / 000124_icon-group-sender_Thu Aug 2 17:06:44 2001.msg < prev    next >
Internet Message Format  |  2002-01-03  |  3KB

  1. Return-Path: <icon-group-sender>
  2. Received: (from root@localhost)
  3.     by baskerville.CS.Arizona.EDU (8.11.1/8.11.1) id f7306VI07739
  4.     for icon-group-addresses; Thu, 2 Aug 2001 17:06:31 -0700 (MST)
  5. Message-Id: <200108030006.f7306VI07739@baskerville.CS.Arizona.EDU>
  6. From: Chris.D.Tenaglia@jci.com
  7. Subject: Re: list processing
  8. To: icon-group@cs.arizona.edu
  9. Cc: dodo@hotmail.com
  10. Date: Thu, 2 Aug 2001 15:14:45 -0500
  11. X-MIMETrack: Serialize by Router on jwimkrs1.na.jci.com/NA/Johnson_Controls(Release 5.07a
  12.  |May 14, 2001) at 08/02/2001 03:34:52 PM
  13. Errors-To: icon-group-errors@cs.arizona.edu
  14. Status: RO
  15. Content-Length: 2090
  16.  
  17. oops, I forgot the concatenator on the command := line
  18. sorry.
  19.  
  20.  
  21.  
  22.                                                                                                                 
  23.                     Chris.D.Tenagl                                                                              
  24.                     ia@jci.com            To:     dodo@hotmail.com                                              
  25.                                           cc:     icon-group@CS.Arizona.EDU                                     
  26.                     08/02/01 11:02        Subject:     Re: list processing                                      
  27.                     AM                                                                                          
  28.                                                                                                                 
  29.                                                                                                                 
  30.  
  31.  
  32.  
  33.  
  34. procedure main(param)
  35.   renlist := param[1]
  36.   (in := open(renlist)) | stop("Can't read ",renlist)
  37.   every line := !in do
  38.      {
  39.       old := parse(line,'\' ')[1]
  40.       new:=parse(line,'\' ')[2]
  41.       command := "ren " || old || " " || new
  42.       write(command)
  43.       system(command)
  44.      }
  45.   close(in)
  46.   write("Process completed.")
  47.   end
  48.  
  49. procedure parse(line,delims)
  50.   static chars
  51.   chars  := &cset -- delims
  52.   tokens := []
  53.   line ? while tab(upto(chars)) do put(tokens,tab(many(chars)))
  54.   return tokens
  55.   end
  56.  
  57.  
  58.  
  59.  
  60.                     dodo@hotmail.
  61.                     com                  To:     icon-group@CS.Arizona.EDU
  62.                                          cc:
  63.                     08/02/01             Subject:     list processing
  64.                     12:09 AM
  65.  
  66.  
  67.  
  68.  
  69.  
  70.  
  71. hello
  72. i need to rename a number of files (approx 120)
  73. all files to be renamed are in the same directory
  74. i have a list with entries like this:
  75. 'name1' 'newname1'
  76. 'name2' 'newname2'
  77. .
  78. .
  79.  
  80. How can i force msdos REName to accept name, newname as parameters ?
  81. (i use  Icon Version 9.3.2.  July 1, 1999 for msdos)
  82. Can you give me a hint ?
  83.  
  84.  
  85.  
  86.  
  87.  
  88.  
  89.  
  90.  
  91.  
  92.  
  93.